import java.util.*;

public class Test {

    public static void printList(int m ,int n,List<Integer> list) {
        if (m == 0) {
            System.out.println(list);
            return;
        }

        if (n <= 0 || m < 0) {
            return;
        }

        List<Integer> list1 = new ArrayList<>(list);

        printList(m,n-1,list);

        list1.add(n);
        printList(m-n,n-1,list1);
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int m = scanner.nextInt();
        int n = scanner.nextInt();

        List<Integer> list = new ArrayList<>();
        int tmp = n > m ? m : n;
        printList(m,n,list);
    }
    public static void main1(String[] args) {
        Stack<Integer> stack1 = new Stack<>();
        //Set<Integer> set = new HashSet<>();

        stack1.push(1);
        stack1.push(1);
        stack1.push(3);
        stack1.push(3);
        stack1.push(5);
        stack1.push(6);

        for(Integer elem : stack1) {
            System.out.println(elem);
        }
    }
}
